<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			//全局作用域
			var name = '张三';
			console.log(window.name);

			function fn() {
				//局部作用域
				var age = 20;
				console.log(age);
			}

			// fn();
			console.log(age);
		</script>

		<script type="text/javascript">
			console.log(">> " + window.name);
		</script>
	</body>
</html>
